From 5892a9035525101380b562a8664560a4db8c1385 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 5 Jan 2009 08:44:44 +0000 Subject: [PATCH] * Use user's language for 'protect-expiring' message in Special:Protectedpages and Special:Protectedtitles, no need to use it as content as it will simply be shown to the user and nothing else * removed $wgOut->setPagetitle( ... ), already done in SpecialPage::execute() --- includes/specials/SpecialProtectedpages.php | 3 +-- includes/specials/SpecialProtectedtitles.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 73ce43f316..4e56ca4286 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -16,7 +16,6 @@ class ProtectedPagesForm { public function showList( $msg = '' ) { global $wgOut, $wgRequest; - $wgOut->setPagetitle( wfMsg( "protectedpages" ) ); if ( "" != $msg ) { $wgOut->setSubtitle( $msg ); } @@ -84,7 +83,7 @@ class ProtectedPagesForm { if ( $row->pr_expiry != 'infinity' && strlen($row->pr_expiry) ) { $expiry = Block::decodeExpiry( $row->pr_expiry ); - $expiry_description = wfMsgForContent( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); + $expiry_description = wfMsg( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); $description_items[] = $expiry_description; } diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 7a3946382e..7e8126d91f 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -16,7 +16,6 @@ class ProtectedTitlesForm { function showList( $msg = '' ) { global $wgOut, $wgRequest; - $wgOut->setPagetitle( wfMsg( "protectedtitles" ) ); if ( "" != $msg ) { $wgOut->setSubtitle( $msg ); } @@ -75,7 +74,7 @@ class ProtectedTitlesForm { if ( $row->pt_expiry != 'infinity' && strlen($row->pt_expiry) ) { $expiry = Block::decodeExpiry( $row->pt_expiry ); - $expiry_description = wfMsgForContent( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); + $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); $description_items[] = $expiry_description; } -- 2.20.1